<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<meta name="viewport" id="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<meta name="format-detection" content="telephone=no" />
        <link rel="stylesheet" href="/static/lib/layui-v2.5.6/layui-v2.5.6/layui/css/layui.css">
		<title>微信登录</title>
		<style>
			.weichatlogin{
                margin: 0 auto;
            }
            .weichatlogin img{
                margin: 60px 30%;
                width: 40%;
            }
            .weichatlogin div{
                width: 100%;
                text-align: center;
            }
            .nav{
                width: 100%;
                position: absolute;
                top: 50%;
            }
            .nav a{
                display: inline-block;
                width: 78%;
                height: 50px;
                background-color: #009688;
                border-radius: 25px;
                line-height: 50px;
                text-align: center;
                margin-top: 10px;
                color: #fff;
            }
		</style>
	</head>
	<body>
		<div class="weichatlogin">
			<span class="UserInfo"><img src="../htmlAPP/images/icon_weichat.png" alt=""></span>
            <div class="usernameInfo">获取信息失败</div>
            <div class="nav">
                <a href="./Interface.html" class="tointerface">取货界面</a>
                <a href="./supplierOrderControllerMobile.html" class="tointerface">订单处理</a>
                <a href="./suppliergetDoorOrderListMobile.html" class="tointerface">送货上门订单</a>
            </div>
		</div>
        <script src="/static/lib/jquery-1.9.1.min.js"></script>
        <script src="/static/lib/layer-v3.1.1/layer-v3.1.1/layer/layer.js"></script>
		<script>
			$(function(){
                var wxResponseUserInfo = sessionStorage.getItem("sessionuserWxResponseUserInfo")
                var userwxusernameInfo = sessionStorage.getItem("userwxusernameInfo")
                if (wxResponseUserInfo != null && wxResponseUserInfo != '' && wxResponseUserInfo != undefined) {
                    $(".UserInfo").html('<img src="'+ wxResponseUserInfo +'" alt="">')
                    $(".usernameInfo").html(userwxusernameInfo)
                }else{
                    var userAgent = navigator.userAgent.toLowerCase();
                    if(userAgent.match(/MicroMessenger/i) == "micromessenger") {
                        window.location = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx45db0b3d36e1f241&redirect_uri=https%3A%2F%2F"+ document.domain +"%2Fstatic%2Fadmin%2Fsupplierautologin.html&response_type=code&scope=snsapi_userinfo&#wechat_redirect";
                    }
                }
            })
		</script>
	</body>
</html>
